package com.msmall.community.play.cases.model;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.msmall.base.model.BaseObject;

/**
 * 动作对象
 * @author zhzy
 *
 */
@Entity
@Table(name="play_cases_target")
public class Target extends BaseObject{

	private static final long serialVersionUID = -6827097952634820727L;

	@Id
	@Column(name="target_id")
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	private Long targetId;
	
	/**
	 * 对象名称
	 */
	@Column(name="target_name")
	private String targetName;
	
	/**
	 * 此对象是否可见 1可以 -1不可以。必须使用道具才可以显示
	 */
	@Column(name="visible")
	private Integer visible;
	
	/**
	 * 1可用 0 不可用
	 */
	@Column(name="enabled")
	private Short enabled;
	
	@ManyToOne(cascade = {CascadeType.PERSIST,CascadeType.MERGE},fetch=FetchType.LAZY)
	@JoinColumn(name="scenario_id")
	private Scenario scenario;
	
	public Long getTargetId() {
		return targetId;
	}
	public void setTargetId(Long targetId) {
		this.targetId = targetId;
	}
	public String getTargetName() {
		return targetName;
	}
	public void setTargetName(String targetName) {
		this.targetName = targetName;
	}
	public Integer getVisible() {
		return visible;
	}
	public void setVisible(Integer visible) {
		this.visible = visible;
	}
	public Short getEnabled() {
		return enabled;
	}
	public void setEnabled(Short enabled) {
		this.enabled = enabled;
	}
	public Scenario getScenario() {
		return scenario;
	}
	public void setScenario(Scenario scenario) {
		this.scenario = scenario;
	}
	@Override
	public boolean equals(Object o) {
		// TODO Auto-generated method stub
		return false;
	}
	@Override
	public int hashCode() {
		// TODO Auto-generated method stub
		return 0;
	}
	@Override
	public String toString() {
		// TODO Auto-generated method stub
		return null;
	}
}